function once(fn) {
  let done = false
  console.log(arguments)
  return function () {
    if (!done) {
        done = true
        console.log(arguments)
        return fn.apply(this,arguments)
    }
  }
}

let pay = once(function(money) {
  console.log(money)
})


pay(5)